package com.example.myproject.service;

import com.example.myproject.model.Promotion;
import com.example.myproject.model.enums.PromotionType;

import java.time.LocalDateTime;
import java.util.Optional;

public interface PromotionService {

    /** 创建 / 更新促销 */
    void createPromotion(Long torrentId,
                         PromotionType type,
                         LocalDateTime start,
                         LocalDateTime end,
                         String name);

    /** 查询指定种子当前是否有生效促销 */
    Optional<Promotion> getActivePromotion(Long torrentId);
}
